<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
    <link rel="shortcut icon" type="image/png" href="#{request.contextPath}/resources/images/favicon.ico"/>
    <link type="text/css" rel="stylesheet"
		href="#{request.contextPath}/resources/css/styles.css" />
    <title>Welcome to MeteoCal</title>
</h:head> 
    <body>
        <div id="leftWel">
            <img src="#{request.contextPath}/resources/images/Home_logo.png" 
                 alt="Welcome to MeteoCal" width="600px"/>
        </div>
        <div id="rightWel">
        <h:body>
            <h:form>
            <p:panel header="Login">
                <p:messages id="messages" showDetail="true" autoUpdate="true" closable="false" />
                <p:panelGrid columns="2">
                    <p:outputLabel for="usernameInput" value="Username"/>
                    <p:inputText id="usernameInput" value="#{loginBean.username}" 
                                 required="false" />
                    <p:outputLabel for="passwordInput" value="Password"/>
                    <p:password id="passwordInput" value="#{loginBean.password}" 
                                required="false" />
                    <p:commandButton value="Login" 
                                     action="#{loginBean.login()}" ajax="false"/>
                </p:panelGrid>
            </p:panel>
        </h:form>
        </h:body>
        <br /><br />
        Not Registered?<br/>
        To open your free account please register now. <br></br>
        <h:link outcome="register" value="Register"/>
        </div>
    </body>
</html>
